home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-11 | 2.3 KB | 84 lines | [TEXT/KAHL] |
- /* test.f -- translated by f2c (version 19940329).
- You must link the resulting object file with the libraries:
- -lf2c -lm (in that order)
- */
-
- #include "f2c.h"
-
- /* Table of constant values */
-
- static integer c__3 = 3;
- static integer c__1 = 1;
- static integer c__4 = 4;
- static integer c__5 = 5;
- static integer c__9 = 9;
-
- /* Main program */ MAIN__(void)
- {
- /* Format strings */
- static char fmt_100[] = "(\002 Enter the indice to count to : \002,$)";
-
- /* System generated locals */
- integer i__1, i__2, i__3;
- real r__1, r__2;
- doublereal d__1, d__2;
-
- /* Builtin functions */
- integer s_wsfe(cilist *), e_wsfe(void), s_rsle(cilist *), do_lio(integer *
- , integer *, char *, ftnlen), e_rsle(void), s_wsle(cilist *),
- e_wsle(void);
- /* Subroutine */ int s_paus(char *, ftnlen), s_stop(char *, ftnlen);
-
- /* Local variables */
- doublereal d;
- integer i, j;
- real x[100];
-
- /* Fortran I/O blocks */
- static cilist io___3 = { 0, 6, 0, fmt_100, 0 };
- static cilist io___4 = { 0, 5, 0, 0, 0 };
- static cilist io___7 = { 0, 6, 0, 0, 0 };
- static cilist io___8 = { 0, 6, 0, 0, 0 };
-
-
- /* -- This is a test FORTRAN program */
- for (i = 1; i <= 100; ++i) {
- x[i - 1] = (real) i;
- }
- s_wsfe(&io___3);
- e_wsfe();
- s_rsle(&io___4);
- do_lio(&c__3, &c__1, (char *)&j, (ftnlen)sizeof(integer));
- e_rsle();
- i__1 = j;
- for (i = 1; i <= i__1; ++i) {
- d = (doublereal) i;
- s_wsle(&io___7);
- do_lio(&c__3, &c__1, (char *)&i, (ftnlen)sizeof(integer));
- do_lio(&c__4, &c__1, (char *)&x[i - 1], (ftnlen)sizeof(real));
- do_lio(&c__5, &c__1, (char *)&d, (ftnlen)sizeof(doublereal));
- /* Computing 2nd power */
- i__3 = i;
- i__2 = i__3 * i__3;
- do_lio(&c__3, &c__1, (char *)&i__2, (ftnlen)sizeof(integer));
- /* Computing 2nd power */
- r__2 = x[i - 1];
- r__1 = r__2 * r__2;
- do_lio(&c__4, &c__1, (char *)&r__1, (ftnlen)sizeof(real));
- /* Computing 2nd power */
- d__2 = d;
- d__1 = d__2 * d__2;
- do_lio(&c__5, &c__1, (char *)&d__1, (ftnlen)sizeof(doublereal));
- e_wsle();
- }
- s_paus("*** End of test output: 3 columns of numbers and then their squa"
- "res ***", 72L);
- s_wsle(&io___8);
- do_lio(&c__9, &c__1, "This program completed a normal run", 35L);
- e_wsle();
- s_stop("End of time", 11L);
- return 0;
- } /* MAIN__ */
-
- /* Main program alias */ int temp_ () { MAIN__ (); return 0; }
-